package top.yaofengqiao.springcloudsimple.payment.biz.domain.pay.model.valobj;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author yfq
 * @date 2024/6/14 17:59
 * @description
 */
@Getter
@AllArgsConstructor
public enum PaymentChannel {
    ALIPAY("alipay", "支付宝"),
    WECHAT("wechat", "微信"),
    ;

    private final String channel;

    private final String desc;

    public static PaymentChannel determinePaymentChannel(String channel) {
        for (PaymentChannel value : PaymentChannel.values()) {
            if (value.getChannel().equals(channel)) return value;
        }

        return null;
    }
}
